package com.apes.scm.masterdata.stock.repository;

import com.apes.framework.jpa.repository.CustomRepository;
import com.apes.scm.masterdata.stock.model.PhyDepot;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;


/**
 * @author HuJianLin
 * @create 2018-03-14 9:25
 */
public interface PhyDepotRepository extends CustomRepository<PhyDepot, String> {

    @Query("SELECT T FROM PhyDepot T WHERE 1 = 1 and (id = :id or name like %:value%) ")
    Page<PhyDepot> find(@Param("id") String id, @Param("value") String value, Pageable pageable);
}
